package tech.lq0.dreamaticvoyage.item.fukamizutech.tool.tier2;

import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import tech.lq0.dreamaticvoyage.item.fukamizutech.tool.BaseMultitool;
import tech.lq0.dreamaticvoyage.tiers.ModItemTier;
import tech.lq0.dreamaticvoyage.tools.ModTags;
import tech.lq0.dreamaticvoyage.tools.RarityTool;

import java.util.List;

public class HQSSBreadMultitool extends BaseMultitool {

    public HQSSBreadMultitool() {
        super(ModItemTier.HQSS_BREAD, 5.0F, -2.4F,
                new Properties().fireResistant().durability(5120).rarity(RarityTool.FUKAMIZU_TIER2));
    }

    @Override
    public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) {
        pTooltipComponents.add(Component.translatable("des.dreamaticvoyage.hqss_bread_multitool").withStyle(ChatFormatting.GRAY));
    }

    @Override
    public float getDestroySpeed(@NotNull ItemStack stack, @NotNull BlockState state) {
        if (state.is(Blocks.COBWEB) || state.is(ModTags.Blocks.FUKAMIZU_BREAD)) {
            return 20.0F;
        } else {
            return super.getDestroySpeed(stack, state);
        }
    }

}
